import React, { Component } from 'react';
import styled from 'styled-components';

const Item = styled.li`
    position: relative;
    line-height: 30px;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    img {
        width: 30px;
        height: 30px;
        border-radius: 15px;
        position: absolute;
        left: 10px;
        top: 10px;      
    }
    p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .name {
        font-size: 14px;
        color: #000;
        padding-left: 40px;
        line-height: 30px;
    }
`

export default function MemberItem(props) {
    return (
        <Item>
            <img src='http://www.qqzhi.com/uploadpic/2015-01-22/073441407.jpg'/>
            <p className='name'>{props.name}</p>                 
        </Item>
    ) 
}